/*
 * Copyright (c) 2006, 2021, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

/**
 * <p>Project: javase - T2
 * <p>Powered by webrx On 2021-12-23 17:50:08
 * <p>Created by IntelliJ IDEA
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class T2 {
    public static void main(String[] args) {
        new Thread(new Tb(), "tb1").start();
        new Ta().start();
        new Ta().start();
        new Thread(new Tb(), "tb2").start();
    }
}

class Ta extends Thread {
    @Override
    public void run() {
        try {
            Thread.sleep(2000);
        } catch (Exception e) {
            e.printStackTrace();
        }
        System.out.println("Ta");
    }
}

class Tb implements Runnable {

    @Override
    public void run() {
        try {
            Thread.sleep(2000);
        } catch (Exception e) {
            e.printStackTrace();
        }
        System.out.println("Tb");
    }
}

